<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>树插件</title>
		<link rel="stylesheet" type="text/css" href="${s.base}/lib/layui/css/layui.css" />
		<link rel="stylesheet" type="text/css" href="${s.base}/css/base/index.css" />
		<link rel="stylesheet" type="text/css" href="${s.base}/lib/dtree/dtree.css"/>
		<link rel="stylesheet" type="text/css" href="${s.base}/lib/dtree/font/iconfont.css"/>
	</head>
	<body class="wrap-container clearfix">
		<div class="column-content-detail padt10" id="tool">
			<div class="cy-table-item-title">
				<div class="cy-button-ctn"></div>
				树案例
			</div>
			<button type="button" class="layui-btn layui-btn-normal layui-btn-mid marb5" id="demo1">单选</button>
			<button type="button" class="layui-btn layui-btn-normal layui-btn-mid marb5" id="demo2">多选</button>
			<ul id="menu" class="dtree" data-id="0"></ul>
		</div>
	<script src="${s.base}/lib/layui/layui.js" type="text/javascript" charset="utf-8"></script>
	<script src="${s.base}/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script>
            //Demo
            layui.use(['form', 'dialog','jquery','dtreeUtil'], function(){
                var form = layui.form
					,$ = layui.jquery
                    ,dialog = layui.dialog
					,dtreeUtil = layui.dtreeUtil;
                $("#demo1").bind("click",function () {
                    $("#menu").html("");
                    dtreeUtil.testDtree("#menu","/baseMenu/dTreeList");
                });
                $("#demo3").bind("click",function () {
                    $("#menu").html("");
                    dtreeUtil.pageDtree("#menu","/baseMenu/dTreeList",false,function (data,obj) {
                    });
                });
                $("#demo2").bind("click",function () {
                    $("#menu").html("");
                    dtreeUtil.pageDtree("#menu","/baseMenu/dTreeList",true,function (data,obj) {
                    });
                });

            });
		</script>
	</body>
</html>